package com.snailct.bpp.router.datachange;

import com.snailct.bpp.commons.CommonException;
import com.snailct.bpp.commons.protocol.WSProtocolHolder;

/**
 * Created by huangxa on 2016/6/17.
 */
public class CallAWebService {
    private String methodName;
    private String sendStr;
    private String webServiceUrl;
    private String sendResult;

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public void setSendStr(String sendStr) {
        this.sendStr = sendStr;
    }

    public void setWebServiceUrl(String webServiceUrl) {
        this.webServiceUrl = webServiceUrl;
    }

    public void sendMessage() {
        try {
            Object[] responses = WSProtocolHolder.getInstance().request(webServiceUrl,methodName,sendStr,"http://SOAPlatform");
            if(responses[0]==null){
                System.out.println("调用失败!");
            }


        } catch (CommonException e) {
            e.printStackTrace();
        }

    }

    public void setSendResult() {

    }

    public String getSendResult() {
        return sendResult;
    }
}
